//app.js
App({
  globalData: {
    toubgsrc:null
  },
  onLaunch: function() {
    this.getUserInfo()
  },
  // 获取用户头像
  getUserInfo: function(){
    let vm = this;
    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)
    // 登录
    wx.login({
      success: res => {
        // openId = vm.getOpenId()
        // console.log("OpenId:"+openId)
        // vm.updateUserDB()
        console.log("Log in succeed")
      }
    })
  }
})